package iscript.gameFramework.GameLite.events 
{
	import flash.events.Event;
	import flash.geom.Point;
	
	public class MouseInputEvent extends Event 
	{
		/**
		 * 更新鼠标位置
		 */
		static public const UPDATEMOUSEPOSITION:String = "updateMousePosition";
		//static public const DRAGMOUSEPOSITION:String = "dragMousePosition";
		
		public function MouseInputEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			
		} 
		
		public var prevPoint:Point= new Point(0,0);
		public var currentPoint:Point= new Point(0,0);
		
		public function get changePoint():Point {
			return new Point(currentPoint.x - prevPoint.x, currentPoint.y - prevPoint.y);
		}
		
		public override function clone():Event 
		{ 
			return new MouseInputEvent(type, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("MouseInputEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
	}
	
}